
#include "Common.h"

BinCodeFunc CreateBinCodeFunc(const uchar *binCode, ulong size)
{
    PVOID p = VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
    memcpy(p, binCode, size);

    return (void(*)())p;
}
